<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>1~100之间的所有整数“求偶数和”和“求奇数和”</title>
    <script>
        var even = 0;
        var odd = 0;
        for(var i = 1; i <= 100; i++){
            if(i % 2 == 0){
                even += i;
            } else{
                odd += i;
            }
        }
        console.log('1~100之间所有的偶数和是'+ even);
        console.log('1~100之间所有的奇数和是'+ odd);
    </script>
</head>
<body>

</body>
</html>